/**
 * 
 */
package com.gragra.parsingApps;

import java.io.IOException;
import java.util.Arrays;
import java.util.regex.Pattern;

/**
 * @author a2
 * 09.11.2013
 */
public class RunDistHeadForSamplersAndLanguages
{
	/**
	 * 
	 */
	private final static Pattern patt = Pattern.compile("^-.*");
	/**
	 * @param args
	 * @throws IOException 
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws IOException, InterruptedException
	{
		int number = 0;
		for(String arg : args)
		{
			if(patt.matcher(arg).matches())
			{break;}
			++number;
		}
		String[] next = Arrays.copyOfRange(args, number-2, args.length);
		for(int i=0; i<number; i+=2)
		{
			next[0] = args[i];
			next[1] = args[i+1];
			RunDistHeadForAllSamplers.main(next);
		}
	}
}